 use Bio::Phylo::IO 'parse';
 use Getopt::Long;
 my($filename, $string);
 GetOptions(
    'file:s' => \$filename,
    'string:s' => \$string
 );
# my $file = shift @ARGV;
# print parse( '-format' => 'newick', '-file' => $file, '-as_project' => 1 )->to_xml;
# my $newick = shift @ARGV;
if( $string ){
 print parse( '-format' => 'newick', '-string' => $string, '-as_project' => 1 )->to_xml;
} else {
 print parse( '-format' => 'newick', '-file' => $filename, '-as_project' => 1 )->to_xml;
}
